package com.yxinsur.imc.business.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import java.util.List;
import com.yxinsur.imc.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.yxinsur.imc.business.mapper.ImcContractInsMapper;
import com.yxinsur.imc.business.domain.ImcContractIns;
import com.yxinsur.imc.business.service.IImcContractInsService;

/**
 * 合同-机构（每份协议对应哪些机构）Service业务层处理
 * 
 * @author imc
 * @date 2021-04-23
 */
@Service
public class ImcContractInsServiceImpl extends ServiceImpl<ImcContractInsMapper, ImcContractIns> implements IImcContractInsService
{
    @Autowired
    private ImcContractInsMapper imcContractInsMapper;
    /**
     * 查询合同-机构（每份协议对应哪些机构）列表
     * 
     * @param imcContractIns 合同-机构（每份协议对应哪些机构）
     * @return 合同-机构（每份协议对应哪些机构）
     */
    @Override
    public List<ImcContractIns> selectImcContractInsList(ImcContractIns imcContractIns)
    {
        return imcContractInsMapper.selectImcContractInsList(imcContractIns);
    }

    /**
     * 新增合同-机构（每份协议对应哪些机构）
     * 
     * @param imcContractIns 合同-机构（每份协议对应哪些机构）
     * @return 结果
     */
    @Override
    public int insertImcContractIns(ImcContractIns imcContractIns)
    {
        imcContractIns.setCreateTime(DateUtils.getNowDate());
        return imcContractInsMapper.insertImcContractIns(imcContractIns);
    }

    /**
     * 修改合同-机构（每份协议对应哪些机构）
     * 
     * @param imcContractIns 合同-机构（每份协议对应哪些机构）
     * @return 结果
     */
    @Override
    public int updateImcContractIns(ImcContractIns imcContractIns)
    {
        imcContractIns.setUpdateTime(DateUtils.getNowDate());
        return imcContractInsMapper.updateImcContractIns(imcContractIns);
    }

    /**
     * 批量删除合同-机构（每份协议对应哪些机构）
     * 
     * @param ids 需要删除的合同-机构（每份协议对应哪些机构）ID
     * @return 结果
     */
    @Override
    public int deleteImcContractInsByIds(String[] ids)
    {
        return imcContractInsMapper.deleteImcContractInsByIds(ids);
    }
}
